﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public class NhanVienBUS
    {
        public static bool DangNhap(string TenDN, string MatKhau)
        {
            return NhanVienDAO.DangNhap(TenDN, MatKhau);
        }

        public static List<NhanVienDTO> SelectAll()
        {
            return NhanVienDAO.SelectAll();
        }

        public static bool Insert(NhanVienDTO nv)
        {
            try
            {
                return NhanVienDAO.Insert(nv);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static bool Delete(int MaNV)
        {
            try
            {
                return NhanVienDAO.Delete(MaNV);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static bool Update(NhanVienDTO nv)
        {
            try
            {
                return NhanVienDAO.Update(nv);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
